//
//  TSTools.h
//  chart
//
//  Created by xu on 15/7/21.
//  Copyright (c) 2015年 xu. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, RECEIVE_STATUS_TYPE) {
    RECEIVE_STATUS_TYPE_DELETE = -1,
    RECEIVE_STATUS_TYPE_NOT_RED = 0,
    RECEIVE_STATUS_TYPE_CONFIRM = 1,
    RECEIVE_STATUS_TYPE_LEAVE = 2,
    RECEIVE_STATUS_TYPE_DELEGATE = 3
};

typedef NS_ENUM(NSInteger, SEND_STATUS_TYPE) {
    SEND_STATUS_TYPE_DELETE = -1,
    SEND_STATUS_TYPE_SENT = 1,
    SEND_STATUS_TYPE_CHANGED = 2,
};

typedef NS_ENUM(NSInteger, JOURNAL_RUN_STATUS) {
    JOURNAL_RUN_STATUS_PROGRESSING = 0,
    JOURNAL_RUN_STATUS_COMPELETED = 1
};


@interface TSTools : NSObject

+ (BOOL)isEmpty:(NSString *)string;
+ (BOOL)isEmptyObject:(id)object;
+ (void)showAlert:(NSString *)msg;

/* 存取deviceToken(推送) */
+ (void)setDeviceToken:(NSData *)deviceToken;
+ (NSData *)getDeviceToken;

+ (NSString *)getReceiveStatusTypeString:(NSInteger)status;
+ (NSString *)getSendStatusTypeString:(NSInteger)status;
+ (NSString *)getJournalStatusTypeString:(NSInteger)status;

+ (NSString *)getDateByTime:(NSTimeInterval)time;
+ (NSString *)getDateNoYearByTime:(NSTimeInterval)time;

/* 校验手机号 */
+ (BOOL)validateMobile:(NSString *)mobile;


@end
